package org.wiztools.te.plugin;

import org.wiztools.te.TEMod;
import org.wiztools.te.TEProcess;

import org.wiztools.te.plugin.helper.UnderlineHelper;

public class CaretUnderline implements TEProcess{

	private TEMod tem;

	public void init(){
		// do nothing!
	}

	public void setTEMod(TEMod tem){
		this.tem = tem;
	}

 	public void action(){
		String str = tem.getSelectedText();
		if(str==null){
			return;
		}
		
		tem.replaceSelection(UnderlineHelper.underline(str, '^'));
	}

	public void destroy(){
		// do nothing!
	}
}
